<?php
/**
 * Created by PhpStorm.
 * User: Thans
 * Date: 2018/10/17
 * Time: 15:58
 */

namespace app\common\controller;

use think\App;
use think\Loader;
//插件执行类
class AddonsController
{
    public function index($_addons, $_controller = 'index', $_action = 'index')
    {
        $_controller = Loader::parseName($_controller, 1);
        $class = "addons\\{$_addons}\\controller\\{$_controller}Controller";
        $vars = [];
        $app = new App();
        return $app->invokeMethod([$class, $_action, $vars]);
    }
}